package model

import "time"

// 用户数据结构体定义
type Good struct {
	Id        uint `gorm:"primary_key;AUTO_INCREMENT"`
	CreateAt time.Time	`gorm:"column:createAt"`
	UpdateAt time.Time `gorm:"column:updateAt"`
	Name   string `json:"name" gorm:"type:varchar(200)"`
	OldPrice   string `json:"oldPrice" gorm:"column:oldPrice;type:varchar(10)"`
	NewPrice   string `json:"newPrice" gorm:"column:newPrice;type:varchar(10)"`
	Desc   string `json:"desc" gorm:"type:varchar(200)"`
	Status uint	`json:"status,omitempty" gorm:"type:int(10)"`
	ImgUrl   string `json:"imgUrl" gorm:"column:imgUrl;type:varchar(200)"`
	InventoryCount uint `json:"inventoryCount,omitempty" gorm:"column:inventoryCount;type:int(10)"`
	SaleCount uint `json:"saleCount,omitempty" gorm:"column:saleCount;type:int(10)"`
	FavorCount uint `json:"favorCount,omitempty" gorm:"column:favorCount;type:int(10)"`
	Address string `json:"address" gorm:"type:varchar(100)"`
	CategoryId uint `json:"categoryId,omitempty" gorm:"column:categoryId;type:int(10)"`
}

// 用户数据结构体定义
type Category struct {
	Id        uint `gorm:"primary_key;AUTO_INCREMENT"`
	Name   string `json:"name" gorm:"type:varchar(200)"`
	CreateAt time.Time	`json:"create_at" gorm:"column:createAt"`
	UpdateAt time.Time `json:"update_at" gorm:"column:updateAt"`
}
